package com.onesports.rabbitmq.message;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.connection.CorrelationData;

/**
 * @Author: HUANG GY.
 * @Date: 2020/6/19 16:53
 * @Description: confirm RabbitMq confim回调
 */
public interface IRabbitmqConfirmCallback {

    /**
     *  confim回调
     * @param correlationData
     * @param ack
     * @param cause
     */
    void confirm(CorrelationData correlationData, boolean ack, String cause);

    /**
     *  return回调
     * @param message
     * @param replyCode
     * @param replyText
     * @param exchange
     * @param routingKey
     */
    void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey);
}
